package com.fcfactory.eggutils.dbUtils.service.impl;

import com.fcfactory.eggutils.dbUtils.CodeGenerationUtil;
import com.fcfactory.eggutils.dbUtils.dto.GenerationCodeParam;
import com.fcfactory.eggutils.common.RestResponse;
import com.fcfactory.eggutils.dbUtils.service.DBUtilService;
import org.springframework.stereotype.Service;

/**
 * @autuor 范大晨
 * @Date 2023/9/19 18:54
 * @description 数据库工具service实现类
 */
@Service
public class DBUtilServiceImpl implements DBUtilService {
    @Override
    public RestResponse generationCode(GenerationCodeParam generationCodeParam) {
        try {
            CodeGenerationUtil codeGenerationUtil = new CodeGenerationUtil();
            codeGenerationUtil.generationCode(generationCodeParam);
            return RestResponse.success();
        } catch (Exception e) {
            e.printStackTrace();
            return RestResponse.err(e);
        }
    }
}
